﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using mediaPrime.Addon.TVServerProvider.MediaPortal.ServiceReference;

namespace mediaPrime.Addon.TVServerProvider.MediaPortal
{
    public class Main : mediaPrime.TVServerProvider.TVServerProviderBase
    {
        private TVServerPluginServiceClient serviceClient;

        public Main()
        {
            serviceClient = new TVServerPluginServiceClient(new BasicHttpBinding(), new EndpointAddress("http://localhost:8066/tvserver"));
        }

        public override bool StartTimeshiftForChannel(string channelId)
        {
            throw new NotImplementedException();
        }

        public override bool StopTimeshiftForChannel(string channelId)
        {
            throw new NotImplementedException();
        }

        public override string GetStreamingUrlForChannel(string channelId)
        {
            throw new NotImplementedException();
        }

        public override List<mediaPrime.TVServerProvider.TVServerChannel> GetChannelList()
        {
            return serviceClient.GetAllChannels();
        }

        public override List<mediaPrime.TVServerProvider.TVServerChannelGroup> GetChannelListGroups()
        {
            return serviceClient.GetChannelGroups();
        }

        public override List<mediaPrime.TVServerProvider.TVServerEPGData> GetCurrentAndNextEPGDataForChannel(string channelId)
        {
            throw new NotImplementedException();
        }

        public override List<mediaPrime.TVServerProvider.TVServerEPGData> GetAllEPGDataForChannel(string channelId)
        {
            throw new NotImplementedException();
        }

        public override List<mediaPrime.TVServerProvider.TVServerEPGData> GetAllEPGData()
        {
            throw new NotImplementedException();
        }
    }
}
